import Vue from 'vue'
import App from './App.vue'
import { Col, Row, Form, Input, Button, Icon, Message, BackTop } from 'ant-design-vue';
import router from './router';
import './assets/css/reset.css';
import animated from 'animate.css'
import './assets/css/index.styl';
import global from './util/global'
import './assets/icons/index.js'
import api from "./util/ajaxRequest.js"

Vue.config.productionTip = false

Vue.prototype.$message = Message;
Vue.prototype.$global = global;
Vue.prototype.$axios = api;

Vue.use(Col);
Vue.use(Row);
Vue.use(Form);
Vue.use(Button);
Vue.use(Icon);
Vue.use(BackTop);
Vue.use(Input);
Vue.use(animated);

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }

  next()
});

new Vue({
  router,
  render: h => h(App),
}).$mount('#app')
